﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Share/Index.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

   <table  id="mainTable" cellspacing="0">
   <caption>会员卡统计</caption>
           <tr>
            <th>
                分类名称
            </th>
                        <th>状态</th>
            <th>总价格</th>
            <th>数量</th>
            <th>借书次数</th>
           </tr>
        <tbody name="mainlist">
        <%
            BIZ.ReportOper ro = new BIZ.ReportOper();
            IList li = ro.getUserCardReport();
            decimal zj=0;
            int sl = 0;
            int times = 0;
            foreach (Hashtable tb in li)
            {
                zj += decimal.Parse(tb["zj"].ToString());
                sl += int.Parse(tb["sl"].ToString());
                times += int.Parse(tb["times"].ToString());
        %>
        <tr>
        <td><%=Enum.GetName(typeof(DAL.Enums.cardType), int.Parse(tb["uc_chargeMode"].ToString()))%></td>
        <td><%=Enum.GetName(typeof(DAL.Enums.cardstate), int.Parse(tb["uc_state"].ToString()))%></td>
        <td><%=Math.Round(decimal.Parse(tb["zj"].ToString()), 2)%></td>
        <td><%=tb["sl"]%></td>
        <td><%=tb["times"]%></td>
        </tr>
        <% 
            }    
        %>
        <tr><td colspan="5" style="height:20px;"></td></tr>
        <tr>
        <td>总计</td>
                <td></td>
        <td><%=Math.Round(zj,2) %></td>
        <td><%=sl %></td>
        <td><%=times%></td>
        </tr>
        </tbody>
    </table>

</asp:Content>
